home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_03_(08-1984).d64
/
rotate 1.c3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
10KB
|
338 lines
1 GOTO910
2 REM ** ML STOP KEY DISABLE **
3 PRINT"x[169]=[133][144][234][169][133][145][234]X` [234][255][169][255][133][155]LX[228]x[169]U[133][144][234][169][228][133][145][234]X`
4 [153]"xhhh+hNOThhhhhhhPRINT#HRUNHX`111"
5 [153]"hhhhhhh`1"
6 [143] ** 4 - POP ML SUBROUTINE **
10 [143] **GENERAL INPUT ROUTINE **
15 :
30 :
35 [143] +++ INPUT SECTION +++
40 [151]UO,0:UR$[178]"":UI$[178]""
42 [139]UL[178]0[167]UL[178]80
45 [153]" CMDCMD";:[151]UC,0
50 [161]UI$:[139]UI$[178]""[167]50
55 [139]UI$[178][199](13)[175][195](UR$)[177][178]1[167][151]UC,1:[153]" CMD";:[137]85
60 [139]UI$[178][199](20)[167]105
62 [139] [195](UR$)[178][177]UL[167]50
65 [141]120:[143] CHECK FOR VALID CHARACTER
70 UR$[178]UR$[170]UI$
75 [153]UI$;
80 [137]50
85 [143] +++ CHECK FOR HELP REQUEST +++
90 [139]UR$[178]UX$[167]195:[143] EXIT TO HELP ROUTINE
95 [139]UF[178]1[167][141]240
100 UF[178]0:[153]:[142]
102 [143] ++ CHECK DELETE ++
105 [139][195](UR$)[179]1[167]50
110 UR$[178][200](UR$,[195](UR$)[171]1)
115 [153]"CMD CMDCMD";:[137]50
120 [143] ++ CHECK FOR VALID CHARACTERS ++
125 [139][195](US$)[178]0[167]150
130 [129]US[178]1[164][195](US$)
135 [139]UI$[178][202](US$,US,1)[167][142]
140 [130]
145 UI$[178]"":[142]
150 [143] ** STANDARD INPUT **
152 [139][198](UI$)[178]46[167][142]
155 [139]UI$[178][199](32)[167][142]
160 [139][198](UI$)[179]48[176][198](UI$)[177]57[167]170
165 [142]
170 [139][198](UI$)[179]65[176][198](UI$)[177]90[167]180
175 [142]
180 [139][198](UI$)[179]193[176][198](UI$)[177]218[167]UI$[178]"":[142]
185 [139][194](UT)[178]UU%[167]UI$[178][199]([198](UI$)[171]128):[142]
187 [142]
190 UI$[178]"":[142]
195 UF[178]1:[143] +++ HELP ROUTINE EXIT +++
197 [141]250
200 [141]245
205 [129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]2)
210 UQ%(UQ[171]UB)[178][194](UQ):[130]:[153]"LOAD"
215 UZ[178]1:UV%[178][194](UT)
216 [137]300
217 UZ[178]0:US$[178]UJ$:UG$[178]UK$:UP[178]UJ:UL[178]UK
218 [139][194](50003)[178]0[167][151]53281,1:[153]"LOAD";:[151]53281,6:[151]53280,14:[137]220
219 [153]"LOAD";
220 UT$[178]UL$:[151]UT,UV%:[129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]3)
225 [151]UQ,UQ%(UQ[171]UB):[130]
230 [151]U1,U1%
232 [151]U2,U2%
233 [151]U4,U4%
234 [151]U3,U3%[171]1
235 [137]35
240 UD%[178]((U2%[172]256[170]U1%[170]U3%)[171]UB)[173]40:[153][200](UD$,UD%[170]1):[142]
245 [153][200](UD$,24);" HELP COMING WAIT ":[142]
250 U1%[178][194](U1):U2%[178][194](U2):U3%[178][194](U3):U4%[178][194](U4)
251 UJ$[178]US$:UK$[178]UG$:UL$[178]UT$:UJ[178]UP:UK[178]UL
255 [142]
300 [143] ** MENU **
301 :
302 [153]"LOAD":[151]UT,UU%:[139][194](50003)[178]0[167][151]53281,9:[151]53280,8
303 :
305 [153]" MENU"
310 [153]" --------------------------------------"
315 [153]" 1. BEGIN ROTATE"
320 [153]" 2. STUDENT INSTRUCTIONS"
325 [153]" 3. TEACHER INSTRUCTIONS"
335 [153]" 4. QUIT"
340 [153]" --------------------------------------"
345 [153]" PRESS A NUMBER KEY (1-4) ";
350 UL[178]1:US$[178]"1234":[141]35:[143] INPUT ROUTINE
352 US$[178]""
355 [145][197](UR$)[141]1000,400,500,396
360 [137]300
395 [143] ** RE-ENABLE STOP KEY AND END **
396 [139][194](50003)[179][177]1[175][194](50003)[179][177]160[175][194](50003)[179][177]0[167]399
397 [158]UU[170]71:[139][194](50003)[178]0[167][151]53281,6:[151]53280,14
398 [153]"CONTLOAD":[128]
399 [141]875:[142]
400 [143] ** STUDENT INSTRUCTIONS **
405 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,0:[151]53280,0
409 UH[178]1:UP[178]0:UG$[178]"(null)TUDENT RIGHT$NST":[141]850
410 [153]" RIGHT$N THIS GAME, YOU WILL BE TRYING TO"
411 [153]" ARRANGE THE LETTERS IN ALPHABETICAL"
412 [153]" ORDER. (null)OU MAY TYPE THE LETTER IN IF"
413 [153]" WISH TO ROTATE THE LETTER, THE ONE TO"
414 [153]" THE RIGHT, THE ONE BELOW IT, AND THE"
415 [153]" ONE BELOW AND TO THE RIGHT. (null)NCE,"
416 [153]" DURING THE GAME YOU MAY TYPE (null) TO SWAP"
417 [153]" TWO ADJACENT LETTERS."
418 W$[178]"":B$[178]"(null) WAIT(null) WAIT(null) WAIT(null) WAIT(null)"
419 [141]1040
490 [139]UZ[178]1[167][158]UP%:[137]217
499 [142]
500 [143] ** TEACHER INSTRUCTIONS **
501 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,2:[151]53280,10
502 UH[178]1:UP[178]0:UG$[178]"(null)EACHER RIGHT$NST":[141]850
503 [153]" (null)O THE BEST OF OUR KNOWLEDGE,"
504 [153]" THIS PROGRAM IS IN THE PUBLIC"
505 [153]" DOMAIN. RIGHT$F THIS IS NOT THE CASE"
506 [153]" PLEASE CONTACT:"
507 [153]" LENOMMODORE PEEKUSINESS (null)ACHINES"
508 [153]" 3370 (null)HARMACY ATNVE.
509 PRINT" [193]GINCOURT, [207]NTARIO"
510 PRINT" [195]ANADA [205]1[215] 2[203]4"
511 PRINT" (416) 499-4292"
512 UH=1:UP=1:GOSUB 835:GOSUB 850:
513 PRINT" [208]ROGRAM [206]AME: [210]OTATE
514 [153]" (null)RITTEN PEEKY : (null)AUL (null)EVELY
515 PRINT" [213]PGRADED [194]Y :
516 [153]" (null)HIS PROGRAM WILL RUN ON ANY
519 PRINT" [208][197][212] 64 [195][207][205][208][213][212][197][210]
520 [153]" LEN(null)(null)(null)(null)STR$(null)(null)VAL 64 LEN(null)(null)(null)(null)(null)VAL(null)
521 GOSUB835
590 IFUZ=1THENSYSUP%:GOTO217
599 RETURN
600 REM ** PROGRAM MODIFICATION INST **
601 PRINT"[147]":POKEUT,UL%
605 UH=1:UP=0:UG$="[208]ROGRAM [205]OD":GOSUB850
660 GOSUB835
690 IFUZ=1THENSYSUP%:GOTO217
699 RETURN
700 REM ** TO USE 8032 LOAD CBM4032 **
710 PRINT"[147]BEFORE RUNNING THIS PROGRAM ON AN 8032
720 [153]" LOAD THE 'CBM 4032' PROGRAM"
730 [158]UU[170]71
740 [128]
800 [143] ** T I T L E P A G E **
802 [153]"LOAD";:[151]UT,UU%:[139][194](50003)[178]0[167][151]53280,14:[151]53281,6
804 [129]I[178]1[164]38:[153]"SPC(WAIT";:[130]
806 [129]I[178]1[164]22:[153]"CMDSPC(WAIT";:[130]
808 [129]I[178]1[164]37:[153]"CMDCMDSPC(WAIT";:[130]
810 [129]I[178]1[164]22:[153]"ONCMDSPC(WAIT";:[130]
812 [153]"STEP WAIT
814 PRINT" [146] [146][169]
816 [153]" WAIT TAB((null)
818 PRINT"[223] [146]
820 [153]"C O M M O D O R E
822 PRINT"EDUCATIONAL
824 [153]"SOFTWARE
826 REM ** COMMODORE LOGO **
827 PRINTLEFT$(UD$,24);"PRESS SPACE BAR OR WAIT[146]":I=0
828 GETA$:IFA$<>" "THENI=I+1:IFI<250THEN828
830 T1$="":T2$="":T3$="":T4$="":I=0
832 GOTO300
835 REM ** SPACE BAR PRESS **
840 POKEUO,0:PRINTLEFT$(UD$,24);"PRESS SPACE BAR TO CONTINUE[146]"
844 GETUI$:IFUI$<>" "THEN844
846 RETURN
850 REM ** PAGE DESIGN ROUTINE **
852 UP=UP+1
855 PRINT"[147]"LEFT$(UT$+UP$,21);RIGHT$(UP$+UG$+STR$(UP),18)
860 PRINT" --------------------------------------"
864 IFUH<>0THEN870
865 PRINTLEFT$(UD$,24);LEFT$(UP$,7);"HELP - PRESS ? <RETURN>"
870 UH=0:PRINT"":RETURN
875 REM ** PLEASE WAIT REMARK **
880 PRINTLEFT$(UD$,24);" ONE MOMENT PLEASE... "
885 RETURN
900 REM ** SET UP VARIABLES **
901 UX$="?":DIMUQ%(1000):UB=32768:U1=196:U2=197:U3=198:U4=216:UC=167:UU=1024
902 UT=59468:UU%=12:UL%=14:UP%=1146:UM=32768:UO=158:POKE 50003,0
903 IFPEEK(50003)=0THENUB=1024:U1=209:U2=210:U3=211:U4=214:UC=204:UU=2048
904 IFPEEK(50003)=0THENUT=53272:UU%=21:UL%=23:UP%=2139:UM=1024:UO=198
905 UD$=""
906 UP$=" "
907 UT$=" [210][207][212][193][212][197] [160][160][160]":REM PLACE PROGRAM TITLE HERE !!!!!!!!!!!!!!!!!***
908 RETURN
910 REM ** SET VARIABLES **
915 GOSUB900
916 DIMB$(18)
920 REM ** CHECK FOR 8032 **
925 PRINT"[147]":PRINT"[160]":REM SHIFTED SPACE
930 IFPEEK(UB+40)<>96THENGOSUB700
931 REM ** MEMORY CHECK **
932 IF FRE(0)>2000THEN937
933 PRINT"[147]THIS MACHINE DOES NOT HAVE ENOUGH"
934 PRINT"MEMORY TO RUN THIS PROGRAM !"
935 SYSUU+71
936 END
937 PRINT"[147]":IFPEEK(50003)=0THEN962
940 REM ** BASIC 2.0 OR 4.0 OR C-64 SETUP **
941 POKE1075,133:POKE1076,144:POKE1077,234:POKE1079,4:POKE1080,133:POKE1081,145
942 POKE1091,155:POKE1098,133:POKE1099,144:POKE1100,234:POKE1103,133
943 POKE1104,145:POKE1105,234:POKE1082,234
945 IFPEEK(50003)<>160THEN955
950 POKE1093,88:POKE1094,228:POKE1097,85:POKE1102,228:GOTO965
955 IFPEEK(50003)<>1THEN990
960 POKE1093,49:POKE1094,230:POKE1097,46:POKE1102,230:GOTO965
962 POKE2099,141:POKE2100,20:POKE2101,3:POKE2103,8:POKE2104,141:POKE2105,21
963 POKE2106,3:POKE2115,145:POKE2117,52:POKE2118,234:POKE2121,49:POKE2122,141
964 POKE2123,20:POKE2124,3:POKE2126,234:POKE2127,141:POKE2128,21:POKE2129,3
965 SYSUU+48:REM DISABLE STOP KEY
970 GOSUB800:REM TITLE
980 GOTO300:REM MENU
990 PRINT"[147]THE PGM WILL NOT WORK ON THIS MACHINE!":END
1000 IFUZ=1THENSYSUP%:SYSUP%:UZ=0:REM ** PROGRAM STARTS HERE **
1001 PRINT"[147]";:RESTORE:IFPEEK(50003)=0THENPOKE53281,6:POKE53280,14
1005 ZZ=RND(-TI):R=0
1010 RESTORE:POKEUT,UL%:UP=0
1020 W$="":B$="[221] [146][221] [146][221] [146][221] [146][221]":GOTO1650
1030 GOSUB850
1031 PRINT"DO YOU WANT INSTRUCTIONS? ";:UL=2:US$="YN":GOSUB35:IFLEFT$(UR$,1)="N"THEN1650
1032 GOSUB1040:GOTO1650
1040 REM
1050 GOSUB835:FORI=0TO17:B$(I)=CHR$(I+65):NEXT:UH=1:GOSUB850
1060 PRINT" [194]OARD POSITIONS ARE OCCUPIED AT RANDOM":PRINT" BY THE LETTERS A TO P"
1070 PRINT" [212]HE OBJECT OF THE GAME IS TO ORDER THE"
1080 PRINT" LETTERS BY MOVING ANY FOUR OF THEM
1090 [153]" ONE POSITION AT A TIME IN A CLOCKWISE"
1100 [153]" DIRECTION. ATNLL FOUR LETTERS WILL MOVE."
1110 [153]" (null)OU SPECIFY THE UPPER LEFT POSITION OF"
1120 [153]" THE FOUR LETTERS YOU WISH TO ROTATE."
1130 [153]" WAIT WAIT (null)HIS SHOWS THE DIRECTIONCMDCMDCMDCMD
1140 PRINT" A [146][192][192]> B [146] OF ROTATION....
1150 [153]" WAIT WAIT
1160 PRINT" ^ [221]
1170 [153]" (null) (null)
1180 PRINT" [146] [146] [217]OU PRESS 'A' TO ROTATE
1190 [153]" D WAIT<TANTAN C WAIT THESE FOUR SQUARES.
1200 PRINT" [146] [146]
1210 [141]835
1220 B$(1)[178]"C":B$(2)[178]"G":B$(5)[178]"B":B$(6)[178]"F"
1230 [141]850:[141]1540:T[178]26
1240 [153]"
1250 PRINTTAB(T);"[201]F THE BOARD
1260 [153][163]T);"IS LIKE THIS
1270 PRINTTAB(T);"AT THE START
1280 [141]835
1290 [153][200](UD$,10);[163]T);"AND IF YOU
1300 PRINTTAB(T);"ROTATE POSI-
1310 [153][163]T);"TION C, THE
1320 PRINTTAB(T);"BOARD WILL
1330 [153][163]T);"CHANGE.
1340 B$(1)="B":B$(2)="C":B$(5)="F":B$(6)="G":A=TI
1350 REM
1351 PRINT"";TAB(7);A$;" [157][157][157][157][157] C [157][157][157][157][157] ";
1352 PRINT"[145][145]";A$;" [157][157][157][157][157] G [157][157][157][157][157] "
1353 PRINT"";TAB(7);A$;" [157][157][157][157][157] B [157][157][157][157][157] ";
1354 PRINT"[145][145]";A$;" [157][157][157][157][157] F [157][157][157][157][157] "
1355 V$="":IFA$=""THENV$=""
1356 A$=V$:IFA$=""THEN1350
1357 GETV$:IFV$<>" "THEN1350
1360 GOSUB1540
1370 PRINT" AND YOU WIN!
1380 [141]835
1390 [141]850:[153]" (null)OU ALSO GET ONE 'SPECIAL' MOVE PER
1400 PRINT" GAME WHICH YOU MAY OR MAY NOT NEED.
1410 [153]" (null)HE SPECIAL MOVE ALLOWS YOU TO
1420 PRINT" EXCHANGE ANY TWO ADJACENT LETTERS IN A ROW OR COLUMN.
1430 [153]" (null)O MAKE THIS MOVE, TYPE 'R' AS YOUR
1440 PRINT" MOVE(THE 'R' STANDS FOR 'RESTRICTED').
1450 [153]" (null)HEN YOU WILL BE ASKED WHICH 2 LETTERS YOU WISH TO EXCHANGE. ";
1460 [153]" (null)HEY MUSTWAIT BE ADJACENT.
1470 PRINT" [207]NLY ONE SPECIAL MOVE PER GAME!
1480 [153]" (null)O GIVE UP, TYPE 'Q' AS YOUR MOVE.
1500 PRINTTAB(12);"[199]OOD LUCK!":GOTO835
1540 PRINT"";
1550 PRINTW$"[176][192][192][192][192][192][178][192][192][192][192][192][178][192][192][192][192][192][178][192][192][192][192][192][174]
1560 [129]I[178]0[164]8[169]4:[153]W$;B$
1570 [153]W$"(null) "B$(I)" WAIT(null) "B$(I[170]1)" WAIT(null) "B$(I[170]2)" WAIT(null) "B$(I[170]3)" WAIT(null)"
1580 [153]W$;B$
1590 [153]W$"-TANTANTANTANTAN(null)TANTANTANTANTAN(null)TANTANTANTANTAN(null)TANTANTANTANTAN<
1600 NEXT:PRINTW$;B$
1610 PRINTW$"[221] "B$(12)" [146][221] "B$(13)" [146][221] "B$(14)" [146][221] "B$(15)" [146][221]"
1620 PRINTW$;B$
1630 PRINTW$"[173][192][192][192][192][192][177][192][192][192][192][192][177][192][192][192][192][192][177][192][192][192][192][192][189]
1640 [142]
1650 [129]I[178]1[164]39:ER$[178]ER$[170]" ":[130]
1660 [129]I[178]1[164]39:ER$[178]ER$[170]"CMD":[130]
1670 DN$[178]""
1680 W$[178]""
1690 [129]I[178]0[164]17:B$(I)[178][199](65[170]I):[130]
1700 [129]I[178]0[164]15:T[178][181](16[172][187](1))
1710 T$[178]B$(I):B$(I)[178]B$(T):B$(T)[178]T$
1720 [130]I:M[178]0:S[178]0:UG$[178]"":UP[178]0:[141]850:[137]1800
1730 [153]DN$;ER$" (null)ETTER TO ROTATE? ";
1740 [141]1930:[139]I[178]16[167]1830
1750 [139]I[178]17[167]2080
1760 [139](I[178]3)[176](I[178]7)[176]((10[179]I)[175](I[179]16))[167]2070
1770 [139]I[178]18[167]2080
1780 M[178]M[170]1:T$[178]B$(I)
1790 B$(I)[178]B$(I[170]4):B$(I[170]4)[178]B$(I[170]5):B$(I[170]5)[178]B$(I[170]1):B$(I[170]1)[178]T$
1800 [153]"":[141]1540
1810 [129]I[178]0[164]15:[139][199](I[170]65)[179][177]B$(I)[167]1730
1820 [130]:[137]1840
1830 UH[178]1:[141]850:[153]" (null)OU MADE CMDCMD";M;"CMD MOVES BEFORE GIVING UP.":[137]1850
1840 UH[178]1:[141]850:[153]" (null)OU ORDERED THE BOARD IN";M;" MOVES.":M1[178]M1[170]M:G[178]G[170]1
1850 [153]" STR$O YOU WANT TO PLAY AGAIN? ";:UL[178]1:US$[178]"YN":[141]35:Y$[178]UR$
1860 [139][200](Y$,1)[178]"Y"[167]R[178]0:[137]1690
1870 [153]" (null)OU PLAYED";G;"GAMES. (null)OU ORDERED
1880 PRINT" THE BOARD IN AN AVERAGE OF";M1/G;"MOVES
1890 [153]" PER GAME. (null)HAT'S NOT BAD, BELIEVE ME!
1900 PRINT"[145][145] [212]HANKS FOR PLAYING. "
1910 GOSUB835:RETURN
1920 PRINTDN$;ER$" [194]AD MOVE, TRY AGAIN. ";
1930 UL=1:US$="ABCDEFGHIJKLMNOPRQ?":GOSUB35:A$=UR$
1990 PRINTER$:IFA$="Q"THENSYSUP%:GOTO1900
2000 FORI=0TO17:IFB$(I)=A$THEN2020
2010 NEXT:GOTO1920
2020 RETURN
2030 PRINT"THE SPACE BAR WILL CONTROL THE SCREEN.[157][157][157]
2040 [153]"WHEN YOU ARE READY TO RECEIVE MORE DATA,PRESS THE SPACE BAR.
2050 GETA$:IFA$<>" "THEN2050
2060 RETURN
2070 PRINTDN$;ER$" [201]LLEGAL MOVE.":FORDD=1TO750:NEXT
2073 PRINT"[145] "
2075 GOTO1730
2080 IFR=1THEN2240
2090 R=1:L=0:PRINT"[145][145] [197]XCHANGE WHICH TWO LETTERS? ";
2091 UL=1:US$="ABCDEFGHIJKLMNOP?":GOSUB35:X$=UR$
2092 PRINT"[145]";TAB(31);:UL=1:US$="ABCDEFGHIJKLMNOP?":GOSUB35:Y$=UR$
2100 FORJ=0TO17:IFB$(J)<>X$THEN2190
2110 IFB$(J+1)=Y$THENL=2
2120 IFB$(J+4)=Y$THENL=4
2130 IFL=2THEN2170
2140 IFL<>4THEN2200
2150 T$=B$(J):B$(J)=B$(J+4):B$(J+4)=T$
2160 GOSUB1540:GOTO1730
2170 T$=B$(J):B$(J)=B$(J+1):B$(J+1)=T$
2180 GOSUB1540:GOTO1730
2190 NEXT
2200 PRINT"[145]SORRY - ";X$;" AND ";Y$;" ARE NOT ADJACENT.":R=0
2210 A=TI
2220 IF(TI-A)<90THEN2220
2230 GOTO1730
2240 PRINT"[145][145]SORRY - ONLY ONE SPECIAL MOVE PER GAME.":GOTO2210